Image processing often involves combining portions of two or more images to construct a composite image. For example, a source image may include an object or a person that can be selected and moved into a target image to construct the composite image. The portion of the source image that is selected for moving is often referred to as a foreground object or foreground image.
One traditional method for combining images is blue screen matting. For blue screen matting, a foreground object is photographed in front of a blue or green background. The uniform color of the background simplifies identification of the foreground object so that an automated process can easily cut the foreground object from a source image for pasting in a target image. A drawback of blue screen matting is the requirement of a specially photographed source image.
For ordinary images, digital image processing systems have provided techniques that allow a user to select a portion of a source image as a foreground object. For example, FIGS. 1A, 1B, and 1C respectively illustrate examples of a source image containing a foreground object 110, a target image that provides a background 120, and a composite image constructed by pasting foreground object 110 into target image 120. For selection of foreground object 110 from the source image of FIG. 1A, conventional image processing software displays the source image and provides a selection tool that appears as a cursor in the displayed image. The user uses a mouse or other pointing device to move the cursor and trace the boundary of the portion of the source image that will become the foreground object. The boundary generally separates selected image pixels from unselected image pixels and mathematically has zero thickness, e.g., is between pixels.
The manual selection process can be complicated when the desired foreground object has an irregular shape that makes tracing the boundary of the object difficult. Accordingly, a user making a selection will often exclude from the selection a desired portion of the foreground object and include in the selection a portion of the background.
Additionally, portions of the desired foreground object may have color from the source image that results from a combination of the object's natural color and the color of the background in the source image. For example, a complex object such as an object with burred edges, hair, smoke, water, glass, and shadow typically has colors that depend on the background. Traditional select, cut, and paste processes do not work well for such objects because the selected foreground object when pasted on the target image has colors inherited from the background of the source image and those colors usually appear unnatural in the composite image.
Since many users desire simple methods for combining portions of separate images to form natural-looking composite images, better methods for selecting foreground objects and better methods for combining portions of source and target images are sought.